<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>Document</title>
  </head>
  <body>
    <script>
      var fruit = prompt('请您输入查询的水果：');
      switch (fruit) {
        case '苹果':
          alert('苹果的价格是 3.5/斤');
          break;
        case '榴莲':
          alert('榴莲的价格是 35/斤');
          break;
        case '香梨':
          alert('香梨的价格是 3/斤');
          break;
        default:
          alert('没有此水果');
      }
    </script>
  </body>
</html>